﻿using Alumnos.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Alumnos.Controllers
{
    public class InscripcionController : Controller
    {
        private AlumnosContext context = new AlumnosContext();

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ConsultarMateria(int codigoMateria)
        {
            Materia materia = context.Materias.Find(codigoMateria);
            return Json(materia, JsonRequestBehavior.AllowGet);
        }

        public ActionResult ConsultarAlumno(int codigoAlumno)
        {
            Alumno alumno = context.Alumnos.Find(codigoAlumno);
            return Json(alumno, JsonRequestBehavior.AllowGet);
        }

    }
}
